<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:sec="http://www.springframework.org/security/tags"
                template="/WEB-INF/template/template.xhtml">

    <ui:define name="Content">

        <ui:param name="bean" value="#{sistemaMBean}" />

        <p:fieldset legend="Lista de Sistemas Desenvolvidos">  
            <h:form>

                <p:dataList value="#{bean.sistemas}" var="sistema" >  
                    #{sistema.nome} - ( #{sistema.sigla} ) : #{sistema.descricao}
                </p:dataList>  

                <sec:authorize ifAnyGranted="ROLE_ADMIN">
                    <br />
                    <p:commandButton action="admin/systemsEdit?faces-redirect=true" value="Editar"
                                     icon="ui-icon ui-icon-pencil" global="false"/>  
                </sec:authorize>

            </h:form> 
        </p:fieldset>

    </ui:define>
</ui:composition>
